package com.mm.domain.taxi;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import com.mm.util.result.DBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 交易信息表
 * </p>
 *
 * @author JueDream
 * @since 2021-08-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("d_taxi_transaction_info")
@ApiModel(value="DTaxiTransactionInfo对象", description="交易信息表")
public class DTaxiTransactionInfo extends DBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "交易ID")
    @TableId(value = "pay_id", type = IdType.AUTO)
    private Integer payId;

    @ApiModelProperty(value = "交易订单号")
    @TableField("order_code")
    private String orderCode;

    @ApiModelProperty(value = "交易状态(10-订单创建(待支付) 20-支付中 30-支付成功 40-支付失败 50-支付取消 60-申请退款 70-退款成功)")
    @TableField("pay_status")
    private Integer payStatus;

    @ApiModelProperty(value = "支付/退款金额(以分为单位)")
    @TableField("pay_price")
    private Integer payPrice;

    @ApiModelProperty(value = "小程序用户编号(乘客ID)")
    @TableField("m_openid")
    private String mOpenid;

    public DTaxiTransactionInfo(){}

    @Builder
    public DTaxiTransactionInfo(Integer payId, String orderCode, Integer payStatus, Integer payPrice, String mOpenid) {
        this.payId = payId;
        this.orderCode = orderCode;
        this.payStatus = payStatus;
        this.payPrice = payPrice;
        this.mOpenid = mOpenid;
    }
}
